<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView();?>
<script>
function view(forumid){
    var url = '<?php echo $this->createUrl('Viewend')?>?forumid='+forumid;	
	art.dialog.open(url,{
		id:'view',
		width:400,
		height:300,
		lock:true,
		fixed:true,
		title:'版块详情'
	});
}

function select_moderator(forumid){
	var path = projectName;
    var url = '<?php echo $this->createUrl('moderator')?>/forumid/'+forumid;	
	art.dialog.open(url, {
		id: forumid,
		title: '设定版主',
		top:'50%',
		width:'580px',
		height:'500px',
		fixed: true,
		lock:true
		}
	);
	
}



</script>
</head>
<body class="view_index" id="view_index_Article">

<div class="mt-10" id="imagetext-list">
<div class="view-index-nav">
        <h3>会员管理</h3>
  <p class="tips">
        <strong style="color:#F00">推荐的版块</strong>会在用户注册时默认添加用户关注的版块里。
        </p>
</div>

<div class="pt-20 padding-0-20 ">
<button class="ui-btn ui-btn-primary mb-10" type="button" onclick="href('<?php echo $this->createUrl('forum/create')?>')"><span class="icon-plus">+</span>添加会员</button>
</div>

</div>

<form class="view-index-form mt-10" method="post" action="<?php echo $this->createUrl('forum/batch');?>" enctype="multipart/form-data">
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>
        <th align="left" width="40">序号</th>
                        <th align="left" width="40">账号</th>
                        <th align="left" width="40">序号</th>
                        <th align="left" width="100">缩略图</th>
                        <th align="left">标题</th>
                        <th align="left" width="30">帖子</th>
                        <th align="left" width="30">关注</th>
                        <th align="center" width="80">设置版主</th>
                        <th align="center" width="60">推荐版块</th>
                        <th align="center" width="60">启用</th>
                        <th class="norightborder" width="150">操作</th>
        </tr>
    </thead>
    <tbody>
   <?php  
        
    foreach($models as $k=>$v){
    ?>
    <tr>
    <td><input class="input-text input-listorder" type="checkbox" value="<?php echo $v['userid'];?>" name="checked_forumid[]"></td>
        <td><?php echo $v['username'];?></td>
        <td><?php echo $v['nickname'];?></td>
                
        <td><img src="<?php echo Yii::$app->request->baseUrl.'/'.$v['avatar'];?>" width="60" height="50"/></td>
                
        <td><?php echo $v['mobileno'];?></td>
        
        <td><?php echo $v['email'];?></td>
         
         <td><?php echo $v['lastlogin'];?></td>
                
         <td></td>
         <td class="td-locked"><div onclick="change_switch(this, '<?php echo $this->createUrl(['forum/recommend', 'userid'=>$v['userid']]);?>');" id="btn-locked" class="locked-<?php echo intval($v['userid']);?>"></div></td> 
         <td class="td-locked"><div onclick="change_switch(this, '<?php echo $this->createUrl(['forum/display', 'userid'=>$v['userid']]);?>');" id="btn-locked" class="locked-<?php echo intval($v['userid']);?>"></div></td> 
           <td class="td-operation">
                  
            <a href="<?php echo $this->createUrl(['forum/update','userid'=>$v['userid'],'page'=>isset($_GET['page']) ? $_GET['page'] : 1])?>" title="编辑" class="operation-update">编辑</a> 
            
             
             <a href="javascript:;" onclick="view(<?php echo $v['userid']?>);" title="查看" class="operation-update">查看</a>
             
             </td>

        <?php
                   
}
?>
    </tr>
     <tr>
     <td colspan="8">
<div class="view-index-batch">
<input id="batch_listorder" class="btn-button" type="submit" value="批量排序" name="batch_listorder"> 
<input id="batch_listorder" class="btn-button" type="submit" value="批量删除" name="batch_delete"> 
</div>
     </td>
     </tr>       
        
        
        
        </tbody>
    
</table>


<?= $this->csrfToken()?>
</form>
<div class="pages">
<?=$this->linkPager($pages)?>
</div>
<script>
$(function(){
        //添加位置导航文字 请修改
	admin_location('版块管理 > 版块列表');
})
</script>
<?php $this->FooterView();?>
</body>
</html>